package com.aiju.bean;

/**
 * @version: V1.0
 * @author: 佐为
 * @date: 2016-09-06 10:50
 * @Description: 包装数据实体
 */
public class Result<T> {

    //返回值
    public String code;
    //数据实体
    public T data;
    //信息
    public String message;
    //是否成功
    public boolean success;

    private Result() {
    }

    public Result(String code, boolean success, String message, T data) {
        this.code = code;
        this.success = success;
        this.message = message;
        this.data = data;
    }

    public Result(String code, String message, T data) {
        this.code = code;
        this.success = true;
        this.message = message;
        this.data = data;
    }

    public Result(T data) {
        this.code = "200";
        this.success = true;
        this.message = "";
        this.data = data;
    }

}
